﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="file_list.aspx.cs" Inherits="LinkCard.AdminCP.UploadExcel.file_list" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript">
        function setValue(page) {
            location.href = 'file_list.aspx?page=' + page;
        }
        function confirmAction() {
            if (confirm('Bạn thực sự muốn xoá file này ???')) {
                // you clicked the OK button.
                // you can allow the form to post the data.
                return true;
            }
            else {
                // you clicked the Cancel button.
                // you can disallow the form submission.
                return false;
            }
        }
    </script>
    <section id="content">
  <section class="container_12 clearfix">
    <section id="main" class="grid_12">
      <article>
        <div class="h1">Danh sách file khách hàng</div>
          <table id="table1" class="gtable sortable" >
            <thead>
              <tr>
                <th><input type="checkbox" class="checkall" /></th>
                <th>Đối tác</th>
                <th>Tiêu đề</th>
                <th>Ngày Upload</th>
                <th>Download/Check</th>
              </tr>
            </thead>
            <tbody>
            <asp:Repeater ID="msgList" runat="server" OnItemDataBound="msgList_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                  <td >
                                    <input type="checkbox" id="chkDelete" runat="server" />
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Name")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Title")%>
                                </td>
                                <td>
                                    <%# LinkCard.Utils.ConvertUtility.ToDateTime( DataBinder.Eval(Container.DataItem, "UploadDate")).ToString("dd/MM/yyyy")%>
                                </td>
                                
                                <td>
                                    <a title="Download" href="<%# System.Configuration.ConfigurationManager.AppSettings["ExcelFolderPath"] + DataBinder.Eval(Container.DataItem, "FileUploadPath")%>"><img src="../Template/images/icons/icon_save.gif" alt="Download" /></a><a title="Cập nhật trạng thái" href="file_active.aspx?id=<%# DataBinder.Eval(Container.DataItem, "FileUploadID")%>"><asp:Image ID="IconCheck" runat="server" AlternateText="Cập nhật trạng thái" /></a>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <tr id="msgNoData" runat="server">
                        <td colspan="5" align="center">
                            Không file upload nào!
                        </td>
                    </tr>
              
              
            </tbody>
          </table>
          <div class="tablefooter clearfix">
             <div class="actions">
              <select id="ActionOption" runat="server">
                <option value="0">Thao tác</option>
                <option value="1">Xóa</option>
              </select>
              
              <asp:Button ID="btnDelete" 
                                runat="server" Text="Thực hiện"  class="button small" 
                    style="width:80px;" onclick="btnDelete_Click"  OnClientClick="javascript:return confirmAction();"   />
            </div>
            <div class="pagination" id="divPager" runat="server">
              <asp:Literal ID="PagerShow" runat="server"></asp:Literal>
               </div>
          </div>
        
      </article>
    </section>
    
  </section>
</section>
</asp:Content>
